global.screen.connect('monitors-changed',
Lang.bind(this, this._monitorsChanged));
this._monitorsChanged();
+
+ this._chrome.connect('primary-fullscreen-changed', Lang.bind(this, function(chrome, state) {
+ this.emit('primary-fullscreen-changed', state);
+ }));
},
// This is called by Main after everything else is constructed;
for (let i = 0; i < this._monitors.length; i++)
wasInFullscreen[i] = this._monitors[i].inFullscreen;
+ let primaryWasInFullscreen = this._primaryMonitor.inFullscreen;
+
this._updateFullscreen();
let changed = false;
break;
}
}
+
if (changed) {
this._updateVisibility();
this._queueUpdateRegions();
}
+
+ if (primaryWasInFullscreen != this._primaryMonitor.inFullscreen) {
+ this.emit('primary-fullscreen-changed', this._primaryMonitor.inFullscreen);
+ }
},
updateRegions: function() {
return false;
}
});
+
+Signals.addSignalMethods(Chrome.prototype);